package com.ruoyi.finance.service.impl;

import java.math.BigDecimal;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finance.mapper.ReconciliationMapper;
import com.ruoyi.finance.domain.Reconciliation;
import com.ruoyi.finance.service.IReconciliationService;

/**
 * 收入支出核销Service业务层处理
 * 
 * @author lmj
 * @date 2024-11-12
 */
@Service
public class ReconciliationServiceImpl implements IReconciliationService 
{
    @Autowired
    private ReconciliationMapper reconciliationMapper;

    /**
     * 查询收入支出核销
     * 
     * @param id 收入支出核销主键
     * @return 收入支出核销
     */
    @Override
    public Reconciliation selectReconciliationById(Integer id)
    {
        return reconciliationMapper.selectReconciliationById(id);
    }

    /**
     * 查询收入支出核销列表
     * 
     * @param reconciliation 收入支出核销
     * @return 收入支出核销
     */
    @Override
    public List<Reconciliation> selectReconciliationList(Reconciliation reconciliation)
    {
        return reconciliationMapper.selectReconciliationList(reconciliation);
    }

    /**
     * 新增收入支出核销
     * 
     * @param reconciliation 收入支出核销
     * @return 结果
     */
    @Override
    public int insertReconciliation(Reconciliation reconciliation)
    {
        return reconciliationMapper.insertReconciliation(reconciliation);
    }

    @Override
    public BigDecimal getProfit(Reconciliation reconciliation) {
        return reconciliationMapper.getProfit(reconciliation);
    }

    /**
     * 修改收入支出核销
     * 
     * @param reconciliation 收入支出核销
     * @return 结果
     */
    @Override
    public int updateReconciliation(Reconciliation reconciliation)
    {
        return reconciliationMapper.updateReconciliation(reconciliation);
    }

    /**
     * 批量删除收入支出核销
     * 
     * @param ids 需要删除的收入支出核销主键
     * @return 结果
     */
    @Override
    public int deleteReconciliationByIds(Integer[] ids)
    {
        return reconciliationMapper.deleteReconciliationByIds(ids);
    }

    /**
     * 删除收入支出核销信息
     * 
     * @param id 收入支出核销主键
     * @return 结果
     */
    @Override
    public int deleteReconciliationById(Integer id)
    {
        return reconciliationMapper.deleteReconciliationById(id);
    }
}
